package com.mvvm.store.bean.basebean;

import java.io.Serializable;

/**
 * Created by leo
 * on 17/12/26.
 * 这个类是泛型类，可根据后端的返回字段修改
 */
public class ResponModel<T> implements Serializable {
    public static final int RESULT_SUCCESS = 20000;

    private T data;
    private int code;
    private Object message;
    private String msg;
    private Object lid;


    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getLid() {
        return lid;
    }

    public void setLid(Object lid) {
        this.lid = lid;
    }

    public T getData() {

        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess(){
        return RESULT_SUCCESS == code;
    }

    @Override
    public String toString() {
        return "ResponModel{" +
                "data=" + data +
                ", code=" + code +
                ", message=" + message +
                ", msg='" + msg + '\'' +
                ", lid=" + lid +
                '}';
    }
}
